package com.prince.enums;

import com.prince.entity.TagItemSimpleVo;

import java.util.ArrayList;
import java.util.List;

public enum  PaymentStatusEnum {
    /** 支付状态 */
    PAYED(1, "已支付"),
    PART_REFUND(2, "部分退款"),
    REFUND(3, "全部退款");

    private Integer code;
    private String name;

    PaymentStatusEnum(Integer code , String name){
        this.code = code;
        this.name = name;
    }
    public Integer getCode(){
        return code;
    }
    public String getName(){
        return name;
    }
    /**
     * 获取支付渠道名称
     * @return String
     */
    public static List<TagItemSimpleVo> getListData(){
        List<TagItemSimpleVo> list = new ArrayList<>();
        for (PaymentStatusEnum value : values()) {
            list.add(new TagItemSimpleVo(String.valueOf(value.getCode()),value.getName()));
        }
        return list;
    }
}
